import json

x = {'name':'你猜','age':19,'city':'四川'}

filename = 'pi_x.txt'
with open (filename,'w') as f:
    json.dump(x,f)
with open (filename) as f_1:
    print(json.load(f_1))
